home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: 17 June 1997
- //
- // Author: gf
- //
- // Description:
- // This implements the Selection Component Mask Marking Menu.
- //
-
-
- global proc doSelectComponentMM()
- {
-
- // Points
- //
- int $maskResult = ( `selectType -q -cv` +
- `selectType -q -polymeshVertex` +
- `selectType -q -subdivMeshPoint` +
- `selectType -q -latticePoint` +
- `selectType -q -particle` );
-
- // Why can't submenu label have check-boxes???
- //
- menuItem -rp "N" -l "Points" -subMenu true;
- menuItem -rp "N" -l "All Points"
- -cb $maskResult
- -c "setComponentPickMask \"Point\" #1";
- menuItem -rp "E" -l "CVs"
- -cb `selectType -q -cv`
- -c "selectType -cv #1";
- menuItem -rp "SE" -l "Poly Vertices"
- -cb `selectType -q -polymeshVertex`
- -c "selectType -polymeshVertex #1";
- menuItem -rp "S" -l "Lattice Points"
- -cb `selectType -q -latticePoint`
- -c "selectType -latticePoint #1";
- menuItem -rp "W" -l "Particles"
- -cb `selectType -q -particle`
- -c "selectType -particle #1";
- menuItem -rp "SW" -l "Subdiv Mesh Points"
- -cb `selectType -q -subdivMeshPoint`
- -c "selectType -subdivMeshPoint #1";
- setParent -m ..;
-
-
- // Parm Points
- //
- menuItem -rp "NE" -l "Parm Points" -subMenu true;
- menuItem -rp "NE" -l "All Parm Points"
- -cb (`selectType -q -editPoint` +
- `selectType -q -curveParameterPoint` +
- `selectType -q -surfaceParameterPoint` )
- -c "setComponentPickMask \"ParmPoint\" #1";
- menuItem -rp "E" -l "Edit Points"
- -cb `selectType -q -editPoint`
- -c "selectType -editPoint #1";
- menuItem -rp "S" -l "Curve Points"
- -cb `selectType -q -cpp`
- -c "selectType -cpp #1";
- menuItem -rp "W" -l "Surface Points"
- -cb `selectType -q -spp`
- -c "selectType -spp #1";
- menuItem -rp "SW" -l "Subdiv Mesh UVs"
- -cb `selectType -q -smu`
- -c "selectType -smu #1";
-
- setParent -m ..;
-
-
- // Lines
- //
- menuItem -rp "E" -l "Lines" -subMenu true;
- menuItem -rp "E" -l "All Lines"
- -cb (`selectType -q -polymeshEdge` +
- `selectType -q -isoparm` +
- `selectType -q -surfaceEdge` )
- -c "setComponentPickMask \"Line\" #1";
- menuItem -rp "S" -l "Poly Edges"
- -cb `selectType -q -polymeshEdge`
- -c "selectType -polymeshEdge #1";
- menuItem -rp "W" -l "Isoparms"
- -cb `selectType -q -isoparm`
- -c "selectType -isoparm #1";
- menuItem -rp "N" -l "Trim Edges"
- -cb `selectType -q -surfaceEdge`
- -c "selectType -surfaceEdge #1";
- menuItem -rp "SE" -l "Springs"
- -cb `selectType -q -springComponent`
- -c "selectType -springComponent #1";
-
- setParent -m ..;
-
-
- // Faces
- //
- menuItem -rp "SE" -l "Faces"
- -cb (`selectType -q -facet` +
- `selectType -q -surfaceFace`)
- -c "selectType -facet #1; selectType -surfaceFace #1";
-
-
- // Hulls
- //
- menuItem -rp "S" -l "Hulls"
- -cb `selectType -q -hull`
- -c "selectType -hull #1";
-
-
-
- // Pivots
- //
- menuItem -rp "SW" -l "Pivots" -subMenu true;
- menuItem -rp "SW" -l "All Pivots"
- -cb (`selectType -q -rotatePivot` +
- `selectType -q -scalePivot` +
- `selectType -q -jointPivot` )
- -c "setComponentPickMask \"Pivot\" #1";
- menuItem -rp "NW" -l "Rotate Pivots"
- -cb `selectType -q -rotatePivot`
- -c "selectType -rotatePivot #1";
- menuItem -rp "NE" -l "Scale Pivots"
- -cb `selectType -q -scalePivot`
- -c "selectType -scalePivot #1";
- menuItem -rp "SE" -l "Joint Pivots"
- -cb `selectType -q -jointPivot`
- -c "selectType -jointPivot #1";
-
- setParent -m ..;
-
-
- // Handles
- //
- menuItem -rp "W" -l "Handles"
- -cb `selectType -q -selectHandle`
- -c "selectType -selectHandle #1";
-
-
- // Misc
- //
- menuItem -rp "NW" -l "Misc." -subMenu true;
- menuItem -rp "NW" -l "All Misc"
- -cb (`selectType -q -imagePlane` +
- `selectType -q -localRotationAxis` )
- -c "setComponentPickMask \"Other\" #1";
- menuItem -rp "E" -l "Local Rotation Axes"
- -cb `selectType -q -localRotationAxis`
- -c "selectType -localRotationAxis #1";
- menuItem -rp "S" -l "Image Planes"
- -cb `selectType -q -imagePlane`
- -c "selectType -imagePlane #1";
-
- setParent -m ..;
-
- // Overflow
- //
- if (!`menuItem -exists selCompMMOvflItem1`) {
- // Only build overflow items if not already built. This
- // allows for multiple postings on a single hotkey hold.
- menuItem -l "All Components on"
- -c "setComponentPickMask \"All\" 1"
- selCompMMOvflItem1;
- menuItem -l "All Components off"
- -c "setComponentPickMask \"All\" 0"
- selCompMMOvflItem2;
- // menuItem -l "Toggle All Components" -enable false;
- menuItem -d true
- selCompMMOvflItem3;
- menuItem -l "Save to shelf"
- -c "saveComponentMaskToShelf"
- selCompMMOvflItem4;
- menuItem -d true
- selCompMMOvflItem5;
- menuItem -l "Select Objects"
- -c "selectMode -object"
- selCompMMOvflItem6;
- }
- setParent -m ..;
- }
-
-
- global proc buildSelectComponentMM()
- //
- // Creates a marking menu that allows the user
- // to select Component masks. It reuses
- // the name tempMM for the name of the menu, to
- // ensure that there's only one of these at
- // any one time.
- {
- if( `popupMenu -exists tempMM` )
- {
- deleteUI tempMM;
- }
-
- global string $gSelect;
- setToolTo $gSelect;
-
- selectMode -component;
-
- popupMenu -sh 1 -mm 1 -b 1 -aob 1 -p viewPanes -pmc "doSelectComponentMM" tempMM;
-
- }
-